<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

	<title>JavaScript Game Loop Study</title>
	
	<link type="text/css" href="css/main.css" rel="stylesheet">
	
	<script type="text/javascript" src="js/lib/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="js/lib/stacktrace-min-0.4.js"></script>
	
	<script type="text/javascript" src="js/util/DebugConsole.js"></script>
	
	<script type="text/javascript" src="js/integratedMixedStepGameLoop/InputManager.js"></script>
	<script type="text/javascript" src="js/integratedMixedStepGameLoop/GameLoop.js"></script>
	<script type="text/javascript" src="js/integratedMixedStepGameLoop/GameEntity.js"></script>
	<script type="text/javascript" src="js/integratedMixedStepGameLoop/ImgManager.js"></script>
		
	<script type="text/javascript">	
		$(document).ready(main);
	
		function main() {
			
			var inputQueue = new Queue(50);
			var canvasMouseListener = new CanvasMouseListener(inputQueue);
			
			var ballClockImgsLocations = new Array(
					"img/ball_clock_anim/ball_clock_anim_01.png",
					"img/ball_clock_anim/ball_clock_anim_02.png",
					"img/ball_clock_anim/ball_clock_anim_03.png",
					"img/ball_clock_anim/ball_clock_anim_04.png",
					"img/ball_clock_anim/ball_clock_anim_05.png",
					
					"img/ball_clock_anim/ball_clock_anim_06.png",
					"img/ball_clock_anim/ball_clock_anim_07.png",
					"img/ball_clock_anim/ball_clock_anim_08.png",
					"img/ball_clock_anim/ball_clock_anim_09.png",
					"img/ball_clock_anim/ball_clock_anim_10.png"
					);
			var ballClockImgs = new ImgManager().loadImages(ballClockImgsLocations);
			
			var gameEntities = new Array(
						new GameEntity(250,100,100,100,ballClockImgs,false,true,"Clock1"),
						new GameEntity(450,50,125,125,ballClockImgs,false,true,"Clock2"),
						new InputAwareGameEntity(75,100,125,125,ballClockImgs,false,false,"Clock3")
						);			
			
			var gameLoop = new GameLoop(gameEntities, inputQueue);
			gameLoop.start();
		}				
	</script>
</head>
<body>
	<center>
		JS Game Loop Study
		<br>
		<br>
		<canvas id="canvas" style="border:3px solid black;">
		</canvas>
		<br>
		<br>
		<div id="debugConsole">
		<div id="d2">
		</div>
	</center>
</body>
</html>